/**
 * @author Tendo
 * @date 2021/7/17
 * @param {number[]} nums
 * @return {number[]} nums
 * @desc 双指针
 */
 const moveZeroes = (nums) => {
    if (nums == null || nums.length <= 1) {
         return;
     }
     let index = 0;
     for (let i = 0; i < nums.length; i++) {
         if (nums[i] != 0) {
             nums[index] = nums[i];
             index++;
         }
     }
 
     for (let i = index; i < nums.length; i++) {
         nums[i] = 0;
     }
 }